package com.bite.logistics.listener;

import com.bite.order.constant.Constants;
import com.bite.order.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = Constants.ORDER_DIRECT_QUEUE)
public class LogisticsListener {

    @RabbitHandler
    public void handlerString(String msg) {
        System.out.println("LogisticsListener 消费消息: " + msg);
    }

    @RabbitHandler
    public void handlerOrderInfo(OrderInfo orderInfo) {
        System.out.println("LogisticsListener 消费消息: " + orderInfo);
    }
}
